package com.wasion.core.db.storage;

import java.util.List;

/**
 * The listener interface for receiving abSqliteStorage events. The class that
 * is interested in processing a abSqliteStorage event implements this
 * interface, and the object created with that class is registered with a
 * component using the component's
 * <code>addAbSqliteStorageListener<code> method. When
 * the abSqliteStorage event occurs, that object's appropriate
 * method is invoked.
 * 
 */
public class SqliteStorageListener {

	/**
	 * 描述：插入数据的监听.
	 * 
	 */
	public static abstract interface DataInsertListener {

		/**
		 * On success.
		 * 
		 * @param paramLong
		 *            the param long
		 */
		public abstract void onSuccess(long paramLong);

		/**
		 * On failure.
		 * 
		 * @param errorCode
		 *            the error code
		 * @param errorMessage
		 *            the error message
		 */
		public abstract void onFailure(int errorCode, String errorMessage);
	}

	/**
	 * 描述：查询数据的监听.
	 * 
	 */
	public static abstract interface DataQueryListener {

		/**
		 * On success.
		 * 
		 * @param paramList
		 *            the param list
		 */
		public abstract void onSuccess(List<?> paramList);

		/**
		 * On failure.
		 * 
		 * @param errorCode
		 *            the error code
		 * @param errorMessage
		 *            the error message
		 */
		public abstract void onFailure(int errorCode, String errorMessage);
	}

	/**
	 * 描述：修改数据的监听.
	 * 
	 */
	public static abstract interface DataUpdateListener {

		/**
		 * On success.
		 * 
		 * @param paramLong
		 *            the param long
		 */
		public abstract void onSuccess(long paramLong);

		/**
		 * On failure.
		 * 
		 * @param errorCode
		 *            the error code
		 * @param errorMessage
		 *            the error message
		 */
		public abstract void onFailure(int errorCode, String errorMessage);
	}
}
